#include <stdio.h>
#include <unistd.h>
#include <pthread.h>

void *MyThreadStrat(void *arg)
{
    (void)arg;
    while(1)
    {
        printf("i am MyThreadStrat\n");
        sleep(1);
    }
    return NULL;
}

int main()
{
    pthread_t tid;
    int ret = pthread_create(&tid,NULL,MyThreadStrat,NULL);
    if(ret != 0)
    {
        perror("pthread_creat");
        return 0;
    }

    while(1)
    {
        printf("i am main thread\n");
        sleep(1);
    }
    return 0;
}
